import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";

@Entity('dict_type')
export class DictType {

    @PrimaryGeneratedColumn()
    id: number //主键

    @Column({
        type: 'varchar',
        length: 50,
        nullable: true,
        default: '',
        comment:"类型名称"
    })
    name: string; //类型名称

    @Column({
        type: 'varchar',
        length: 50,
        nullable: true,
        default: '',
        comment:"类型编码"
    })
    code: string; //类型编码

    @Column({
        type: 'tinyint',
        nullable: true,
        default: 0,
        comment: "状态(0:正常;1:禁用)"
    })
    status: number; //状态(0:正常;1:禁用)

    @Column({
        type: 'varchar',
        length: 255,
        nullable: true,
        default: null,
        comment: '备注'
    })
    remark: string; //备注

    @Column({
        name: 'create_time',
        type: 'timestamp',
        default: () => 'CURRENT_TIMESTAMP',
    })
    createTime: Date; //用户创建时间

    @Column({
        name: 'update_time',
        type: 'timestamp',
        default: () => 'CURRENT_TIMESTAMP',
    })
    updateTime: Date; //用户信息更新时间

}
